import Vue from 'vue'
import Vuex from 'vuex'
// import * as types from './types.js'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    list: []
  },
  mutations: {
    ['ADD_INPUT_VALUE'](state, val) {
      state.list.push(val)
    },
    ['REMOVE_ITEM'](state, index) {
      state.list.splice(index, 1)
    }
  },
  actions: {
    addInputValue({ commit }, value) {
      commit('ADD_INPUT_VALUE', value)
    },
    removeItem({ commit }, index) {
      commit('REMOVE_ITEM', index)
    }
  },
  getters: {

  },
  modules: {
  }
})
